<template>
  <div>
    <h2>父组件</h2>
    <Child :msg="messageFromParent" @reply="getFromChild" />
  </div>
</template>

<script setup>
import Child from './Child.vue'
const messageFromParent = 'Hello 子组件'
const getFromChild = (val: string) => {
  alert('子组件发来消息：' + val)
}
</script>
